<?php
/**
 * Created by PhpStorm.
 * User: times
 * Date: 2018/5/14
 * Time: 11:02
 */
namespace app\common\validate;
use think\Validate;
class User extends Validate {
    protected $rule = [
        'username' => 'require',
        'password' => 'require',
        'repassword' => 'require',
        'email' => 'email',

    ];



    // 场景设置
    protected  $scene = [
        'login' => ['username', 'password'],
        'register' => ['username','password','repassword','email']
    ];
}